Specifying Connection Options

You can modify a connection by specifying connection string options. See ".NET Public Objects/Interfaces Supported" for information about specifying options through the Client's SequeLinkConnection object.

The basic format of a connection string includes a series of keyword/value pairs separated by semicolons. The following example shows the keywords and values for a simple connection string to connect to the host hal:

"Host=hal;Port=19998;User Id=test01;Password=test01;Database=test;" 

Use the following guidelines when specifying a connection string:

Table 9-1 gives the names for each connection string option, as well as a description. The defaults listed are initial defaults that apply when no value is specified in the connection string.

Table 9-1. .NET Connection String Options  
Option
Description
Alternate Servers
Specifies a list of alternate database servers to which the data provider will try to connect if the primary SequeLink server is unavailable. Specifying a value for this connection string option enables connection failover for the data provider.
The value you specify must be in the form of a string that defines the physical location of each alternate server. You must specify the server name or the IP address and port number of each alternate SequeLink server. All of the other required connection information for each alternate server is the same as what is defined for the primary server connection. Currently, the only optional connection string option that can be set for the alternate server is Server Data Source. The string has the format:
"Host=servername1;Port=port1[;ServerDataSource=serverdsname]" 
For example, the following connection string defines two alternate SequeLink servers for connection failover:
"Host=server1;port=19996;ServerDataSource=SDSN1:User ID=test;Password=
secret;Alternate Servers=(Host=server2:Port=19996:ServerData Source=
SDSN2,Host=server3:Port=19996:ServerDataSource=SDSN3)" 
See "Using Connection Failover" for a discussion of connection failover and for information about other connection string options that you can set for this feature.
Connection Lifetime
Specifies the number of seconds to keep connections in a connection pool. The pool manager periodically checks all pools, and closes and removes any connection that exceeds its lifetime. The Min Pool Size connection string option can cause some connections to ignore this value.
Valid values are 0 to 65335.
When set to 0 (the initial default), the lifetime is never limited by time.
Connection Reset
Connection Reset={True | False}. Specifies whether a connection that is removed from the connection pool for reuse by an application will have its state reset to the initial configuration settings of the connection. Resetting the state impacts performance of the reused connections because the new connection must issue additional commands to the server.
When set to false (the initial default), the data provider does not reset the state of the connection.
Connection Retry Count
Specifies the number of times the data provider tries to connect to the primary server, and, if specified, the alternate servers after the initial unsuccessful attempt.
The value can be any integer from 0 to 65535.
When set to 0 (the initial default), the data provider does not try to reconnect after the initial unsuccessful attempt.
If a connection is not established during the retry attempts, the data provider returns an error that is generated by the last server to which it attempted to connect.
This option and Connection Retry Delay, which specifies the wait interval between attempts, can be used in conjunction with connection failover. Refer to the SequeLink Administrator's Guide for a discussion of connection failover and for information about other connection string options that you can set for this feature
Connection Retry Delay
Specifies the number of seconds the data provider waits after the initial unsuccessful connection attempt before retrying a connection to the primary server, and, if specified, the alternate servers.
The value can be any integer from 0 to 65535.
The initial default is 3 (seconds). When set to 0, there is no delay between retrying the connection.
NOTES:
  • This option has no effect unless the Connection Retry Count connection string option is set to an integer value greater than 0.
  • This option and the Connection Retry Count connection string option, which specifies the number of times the data provider attempts to connect after the initial attempt, can be used in conjunction with connection failover. Refer to the SequeLink Administrator's Guide for a discussion of connection failover and for information about other connection string options that you can set for this feature.
Database
Specifies the name of the database to which you want to connect.
Enlist
Enlist={True | False}. Specifies whether the data provider automatically attempts to enlist the connection in creating the thread's current transaction context. This connection string option is enabled only when the data provider is installed with a Server license and the optional MS DTC Support components were selected.
When set to false (the initial default), the data provider does not automatically attempt to enlist the connection.
NOTE: Enlisting in distributed transactions requires the data provider to call unmanaged code.
Host
Specifies either the IP address or the name of the server to which you want to connect. For example, if your network supports named servers, you can specify a server name such as SequeLinkAppServer. Or, you can specify an IP address such as 122.23.15.12.
The initial default is localhost, which specifies a SequeLink server running on the local machine.
License Path
Specifies the fully-qualified path to the DDTEK.LIC license file. The license file is installed by default in the product installation directory, for example, C:\install_dir\DDTek.lic.
If you do not provide this option, the data provider looks for the license file in the application's current directory. If the license file is not found, the data provider checks for keys placed in the registry during the installation process; then, the data provider looks for the license key in the installation directory. If the license key is still not found, the data provider fails to connect.
The initial default is an empty string.
Load Balancing
Load Balancing={true | false}. Determines whether the data provider uses client load balancing in its attempts to connect to primary and alternate SequeLink servers. The list of alternate servers is specified by the Alternate Servers connection option.
When set to true, the data provider attempts to connect to the database servers in random order.
When set to false (the initial default), client load balancing is not used and the data provider connects to each server based on its sequential order (primary server first, then, alternate servers in the order they are specified).
NOTE: This option has no effect unless alternate servers are defined for the Alternate Servers connection string option.
The Load Balancing connection string option is an optional setting that you can use in conjunction with connection failover. Refer to the SequeLink Administrator's Guide for more information for a discussion of connection failover and for information about other connection options that you can set for this feature.
Max Number Of Pools
Specifies the maximum number of connection pools that can be in use at a time during the life of the process.
The value can be any integer from 1 to 65335.
The initial default is 100.
See "Creating a Connection Pool" for more information about creating connection pools.
Max Pool Size
Specifies the maximum number of connections within a single pool. When the maximum number is reached, no additional connections can be added to the connection pool.
The value can be any integer from 1 to 65335.
The initial default is 100.
See "Creating a Connection Pool" for more information about creating connection pools.
Min Pool Size
Specifies the minimum number of connections are opened and placed in a connection pool when it is created. The connection pool retains this number of connections, even when some connections exceed their Connection Lifetime value.
The value can be any integer from 0 to 65 335.
When set to 0 (the initial default), no additional connections are placed in the connection pool when it is created.
See "Removing Connections from a Pool" for a discussion of connection lifetimes.
MS Pooling
MS Pooling={true | false}. Specifies whether the data provider uses the legacy DataDirect connection pooling implementation (see "Using Connection Failover").
When set to false, the data provider uses the legacy connection pool model, which is provided only for backward compatibility.
When set to true (the initial default), the data provider does not use the legacy connection pool model.
Password
Specifies the host or data store password, which may be required depending on the server configuration.
Pooling
Pooling={True | False}. Specifies whether connections are pooled. Connection pooling can significantly enhance the performance and scalability of your application.
When set to True (the initial default), connection pooling is enabled.
Port
Specifies the TCP/IP port on which the SequeLink Server is listening.
The initial default is 19996.
ServerDataSource
Specifies the server data source to be used by the connection. If not specified, the configuration of the default server data source are used.
User ID
Specifies the SequeLink User ID for this connection, which may be required depending on the server configuration.